const obj = {
  date: [2, 4, 6],
  teachers: {
    '杨老师': 'vue,react,nodejs',
    '夏老师': 'mp,wechat,safe',
    '韩老师': 'rn,webpack',
    '盛老师': 'test,perf,interview,end'
  },
  details: [
    {
      title: 'vue01',
      content: 'Vue入门',
      catg: 'vue'
    },
    {
      title: 'vue02',
      content: 'Vue组件化设计',
      catg: 'vue'
    },
    {
      title: 'vue03',
      content: 'Vue全家桶实战',
      catg: 'vue'
    },
    {
      title: 'vue04',
      content: 'Vue电商项目实战01',
      catg: 'vue'
    },
    {
      title: 'vue05',
      content: 'Vue电商项目实战02',

      catg: 'vue'
    },
    {
      title: 'vue06',
      content: 'Vue电商项目实战02',

      catg: 'vue'
    },
    {
      title: 'vue07',
      content: 'Vue源码实战',
      catg: 'vue'

    },
    {
      title: 'React01',
      content: 'React入门',
      catg: 'react'

    },
    {
      title: 'React02',
      content: 'React组件化',
      catg: 'react'

    },
    {
      title: 'React03',
      content: 'React全家桶',
      catg: 'react'

    },
    {
      title: 'React04',
      content: 'dva实战',
      catg: 'react'

    },
    {
      title: 'React05',
      content: 'React电商项目实战01',
      catg: 'react'

    },
    {
      title: 'React06',
      content: 'React电商项目实战02',

      catg: 'react'

    },
    // {
    //   title:"React07",
    //   content:"React电商项目实战03",
    //   catg:'react',

    // },
    {
      title: 'React07',
      content: '源码',
      catg: 'react'

    },
    {
      title: 'Nodejs01',
      content: 'Nodejs01',
      catg: 'nodejs'

    },
    {
      title: 'Nodejs02',
      content: `Nodejs02 网络编程`,
      catg: 'nodejs'

    },
    {
      title: 'Nodejs03',
      content: `Nodejs03
      持久化mysql`,

      // content:"Nodejs03",
      catg: 'nodejs'

    },
    {
      title: 'Nodejs04',
      // content:"Nodejs04",
      content: `Nodejs04 
      持久化mongodb
      redis`,

      catg: 'nodejs'

    },
    {
      title: 'Nodejs05',
      // content:"Nodejs05",
      content: `Nodejs05
      koa实战`,

      catg: 'nodejs'

    },
    {
      title: 'Nodejs06',
      // content:"Nodejs06",
      content: `Nodejs06 
      鉴权实战`,

      catg: 'nodejs'

    },
    {
      title: 'Nodejs07',
      // content:"Nodejs07",
      content: `Nodejs07
      resuful接口
      常见任务`,

      catg: 'nodejs'

    },
    {
      title: 'Nodejs08',
      // content:"Nodejs08",
      content: `Nodejs08
      eggjs mvc分层
      `,

      catg: 'nodejs'

    },
    {
      title: 'Nodejs09',
      // content:"Nodejs09",
      content: `Nodejs09
      koa源码解读`,

      catg: 'nodejs'
    },
    {
      title: 'Nodejs10',
      // content:"Nodejs09",
      content: `Nodejs10
      服务端渲染ssr 
      项目部署`,

      catg: 'nodejs'
    },

    {
      title: '微信公众号开发011',
      content: '微信公众号开发01',
      catg: 'wechat'
    },
    {
      title: '微信公众号开发02',
      content: '微信公众号开发02',
      catg: 'wechat'
    },

    {
      title: '小程序01',
      content: '小程序入门',
      catg: 'mp'
    },
    {
      title: '小程序02',
      content: '小程序入门',
      catg: 'mp'
    },
    {
      title: '小程序03',
      content: '小程序入门',
      catg: 'mp'
    },
    {
      title: '小程序04',
      content: '小程序入门',
      catg: 'mp'
    },

    {
      title: '前端安全01',
      content: '前端安全01',
      catg: 'safe'
    },
    {
      title: '前端安全02',
      content: '前端安全02',
      catg: 'safe'
    },
    {
      title: 'React-native01',
      content: 'React-native01',
      catg: 'rn'
    },
    {
      title: 'React-native02',
      content: 'React-native02',
      catg: 'rn'
    },
    {
      title: 'React-native03',
      content: 'React-native03',
      catg: 'rn'
    },
    {
      title: 'React-native04',
      content: 'React-native04 + flutter',
      catg: 'rn'
    },
    {
      title: 'Flutter实战',
      content: '+ flutter',
      catg: 'rn'
    },

    {
      title: '工程化01',
      content: '工程化01',
      catg: 'webpack'
    },
    {
      title: '工程化02',
      content: '工程化02',
      catg: 'webpack'
    },

    {
      title: '前端自动化测试01',
      content: '前端自动化测试01',
      catg: 'test'
    },
    {
      title: '前端自动化测试02',
      content: '前端自动化测试02',
      catg: 'test'
    },
    {
      title: '性能优化01',
      content: '性能优化01',
      catg: 'perf'
    },
    {
      title: '性能优化02',
      content: '性能优化02',
      catg: 'perf'
    },

    {
      title: '面试01',
      content: '面试01',
      catg: 'interview'
    },
    {
      title: '面试02',
      content: '面试02',
      catg: 'interview'
    },

    {
      title: '结课',
      content: '结课',
      catg: 'end'
    }

  ]
}
const catgTeachers = {}
Object.entries(obj.teachers).forEach(val => {
  const [ name, catg ] = val
  catg.split(',').forEach(v => {
    catgTeachers[v] = name
  })
})
obj.details.map(v => {
  v.teacher = catgTeachers[v.catg]
  return v
})
export default obj
